<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateTestTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateTestLabel_idTest}" for="idTest" />
                    <h:inputText id="idTest" value="#{testController.selected.idTest}" title="#{bundle.CreateTestTitle_idTest}" required="true" requiredMessage="#{bundle.CreateTestRequiredMessage_idTest}"/>
                    <h:outputLabel value="#{bundle.CreateTestLabel_testContent}" for="testContent" />
                    <h:inputText id="testContent" value="#{testController.selected.testContent}" title="#{bundle.CreateTestTitle_testContent}" />
                    <h:outputLabel value="#{bundle.CreateTestLabel_testName}" for="testName" />
                    <h:inputText id="testName" value="#{testController.selected.testName}" title="#{bundle.CreateTestTitle_testName}" />
                    <h:outputLabel value="#{bundle.CreateTestLabel_idTopic}" for="idTopic" />
                    <h:selectOneMenu id="idTopic" value="#{testController.selected.idTopic}" title="#{bundle.CreateTestTitle_idTopic}" >
                        <f:selectItems value="#{topicController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.CreateTestLabel_r1}" for="r1" />
                    <h:inputText id="r1" value="#{testController.selected.r1}" title="#{bundle.CreateTestTitle_r1}" />
                    <h:outputLabel value="#{bundle.CreateTestLabel_r2}" for="r2" />
                    <h:inputText id="r2" value="#{testController.selected.r2}" title="#{bundle.CreateTestTitle_r2}" />
                    <h:outputLabel value="#{bundle.CreateTestLabel_r3}" for="r3" />
                    <h:inputText id="r3" value="#{testController.selected.r3}" title="#{bundle.CreateTestTitle_r3}" />
                    <h:outputLabel value="#{bundle.CreateTestLabel_r}" for="r" />
                    <h:inputText id="r" value="#{testController.selected.r}" title="#{bundle.CreateTestTitle_r}" />
                </h:panelGrid>
                <br />
                <h:commandLink action="#{testController.create}" value="#{bundle.CreateTestSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{testController.prepareList}" value="#{bundle.CreateTestShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:link outcome="/index" value="#{bundle.CreateTestIndexLink}"/>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
